package com.jc.gateway.service.impl;

import com.jc.gateway.domain.CustomerApiSecret;
import com.jc.gateway.mapper.CustomerApiSecretMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

import javax.annotation.Resource;


@Service
public class SecretService {

    private final Logger logger = LoggerFactory.getLogger(getClass());


    @Resource
    private CustomerApiSecretMapper customerApiSecretMapper;

    public CustomerApiSecret findById(String secretId) {
        logger.info("***********entry secretId*************" + secretId);
        Example example = new Example(CustomerApiSecret.class, true, true);
        example.createCriteria()
                .andEqualTo("secretId", secretId);
        CustomerApiSecret customerApiSecret = customerApiSecretMapper.selectOneByExample(example);

        return customerApiSecret;
    }

}